<?php

 public function splitNumbersd(){

    	$number = Request::post("number/s", "10");

        $number_arr = array(500,300,200,100,50,20,10);
        $arr = array();
        $arrLenth = count($number_arr);
        for($i=0;$i>=0;$i++){
            foreach($number_arr as $v){
                if($number >= $v){
                    $arr[] = $v;
                    $number -= $v;
                    break;
                }
            }
            if($number < $number_arr[$arrLenth-1]){
                break;
            }
        }

        var_dump($arr);exit;
        return $arr;
    }

?>